<?php
@session_start();
include_once("../initial.php");
$DOCUMENT_ROOT=$_SERVER["DOCUMENT_ROOT"];
include_once(constant('PROJECT_DIR')."/logic/deviceLogic.php");
$dh=new deviceLogic();
$deviceId=$_GET['did'];
$pictures=$dh->get_device_pictures($deviceId);
for($i=0; $i<count($pictures); $i++)
{
		$pictures[$i]['pictureUrl']=constant('PROJECT_URL')."/".constant('PICTURE_SUBDIR')."/".$pictures[$i]['picture_name'];
}
$smarty->assign("pictures", $pictures);
$smarty->assign("projectUrl", constant('PROJECT_URL'));
$smarty->display("showpictures/showpictures.html");
?>
